package com.IODemo.CharStream;

import java.io.FileReader;
import java.io.IOException;

/**
 * @Author milian
 * @Date 2021/7/27 0027 20:27
 */
public class fileReaderDemo {
    public static void main(String[] args) throws IOException {
         FileReader fr = new FileReader("H:\\test\\test.txt");
         char[] chars = new char[1024];
         int len;
         while ((len=fr.read(chars))!=-1){
             System.out.println(new String(chars,0,len));
         }
            fr.close();
    }
}
